package nju.software.xkxt.data.dataobject;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author typ
 * 
 */
@Entity
@Table(name = "user", catalog = "xkxtbeta")
public class UserDO implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 60803763950279618L;
	private Integer userId;
	private String name;
	private String schoolNo;
	private String pwd;
	private Integer role;
	private Integer sex;
	private String email;
	private String phone;

	// Constructors

	/** default constructor */
	public UserDO() {
	}

	/** minimal constructor */
	public UserDO(Integer userId) {
		this.userId = userId;
	}

	/** full constructor */
	public UserDO(Integer userId, String name, String schoolNo, String pwd,
			Integer role, Integer sex, String email, String phone) {
		this.userId = userId;
		this.name = name;
		this.schoolNo = schoolNo;
		this.pwd = pwd;
		this.role = role;
		this.sex = sex;
		this.email = email;
		this.phone = phone;
	}

	// Property accessors
	@Id
	@Column(name = "user_id", unique = true, nullable = false)
	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	@Column(name = "name", length = 45)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "school_no", length = 45)
	public String getSchoolNo() {
		return this.schoolNo;
	}

	public void setSchoolNo(String schoolNo) {
		this.schoolNo = schoolNo;
	}

	@Column(name = "pwd", length = 45)
	public String getPwd() {
		return this.pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	@Column(name = "role")
	public Integer getRole() {
		return this.role;
	}

	public void setRole(Integer role) {
		this.role = role;
	}

	@Column(name = "sex")
	public Integer getSex() {
		return this.sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}

	@Column(name = "email", length = 100)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "phone", length = 45)
	public String getPhone() {
		return this.phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

}